<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<StockExchanger.Models.aspnet_User>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Profile
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>My Profile</h2>

    <table>
        <tr>
            <th></th>
<!--            <th>
                ApplicationId
            </th>
            <th>
                UserId
            </th>
            
-->            <th>
                UserName
            </th>
<!--            <th>
                LoweredUserName
            </th>
-->
            <th>
                MobileAlias
            </th>
            <th>
                IsAnonymous
            </th>
            <th>
                LastActivityDate
            </th>
            <th>
                CurrentBalance in $
            </th>
        </tr>

    <% foreach (var item in Model)
       {
           if (item.UserName == Page.User.Identity.Name)
           {%>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "EditProfile", new { id = item.UserId })%> |
                <%= Html.ActionLink("Details", "DetailedProfile", new { id = item.UserId })%>
            </td>
<!--            <td>
                <%= Html.Encode(item.ApplicationId) %>
            </td>
            <td>
                <%= Html.Encode(item.UserId) %>
            </td>
-->
            <td>
                <%= Html.Encode(item.UserName)%>
            </td>
<!--            <td>
                <%= Html.Encode(item.LoweredUserName) %>
            </td>
-->
            <td>
                <%= Html.Encode(item.MobileAlias)%>
            </td>
            <td>
                <%= Html.Encode(item.IsAnonymous)%>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.LastActivityDate))%>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.balance))%>
            </td>
        </tr>
    
    <% }
       } %>

    </table>

<!--    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>
-->
</asp:Content>

